#include "VInputDialog.h"
#include "ui_VInputDialog.h"

VInputDialog::VInputDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::VInputDialog)
{
    ui->setupUi(this);
}

VInputDialog::~VInputDialog()
{
    delete ui;
}

void VInputDialog::setTitle(QString text)
{
    this->setWindowTitle(text);
}

void VInputDialog::lineedit_select_all()
{
    ui->lineEdit->selectAll();
}

void VInputDialog::lineedit_set_text(QString text)
{
    ui->lineEdit->setText(text);
}

void VInputDialog::on_btn_ok_clicked()
{
    m_text = ui->lineEdit->text();
    this->accept();
}

void VInputDialog::on_btn_cancel_clicked()
{
    this->reject();
}
